home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form Balloon_Form
- Caption = "Help Ballon Test"
- ClientHeight = 5325
- ClientLeft = 1305
- ClientTop = 2070
- ClientWidth = 5085
- Height = 6015
- Left = 1245
- LinkTopic = "Form1"
- ScaleHeight = 5325
- ScaleWidth = 5085
- Top = 1440
- Width = 5205
- Begin Balloon Balloon1
- BackColor = &H0000FFFF&
- ForeColor = &H000000FF&
- Left = 2400
- Top = 3480
- End
- Begin ComboBox Combo1
- Height = 300
- Left = 240
- TabIndex = 15
- Text = "Combo1"
- Top = 2880
- Width = 2175
- End
- Begin CommandButton BTN_Dialog
- Caption = "Dialog"
- Height = 375
- Left = 240
- TabIndex = 14
- Top = 240
- Width = 1335
- End
- Begin OptionButton Option3
- Caption = "Maybe option"
- Height = 255
- Left = 1200
- TabIndex = 13
- Top = 4320
- Width = 1575
- End
- Begin PictureBox Picture1
- AutoSize = -1 'True
- ClipControls = 0 'False
- Height = 360
- Left = 360
- Picture = GENERAPP.FRX:0000
- ScaleHeight = 330
- ScaleWidth = 360
- TabIndex = 12
- Top = 3600
- Width = 390
- End
- Begin CheckBox Check2
- Caption = "That"
- Height = 255
- Left = 1200
- TabIndex = 11
- Top = 3840
- Width = 1200
- End
- Begin CheckBox Check1
- Caption = "This"
- Height = 255
- Left = 1200
- TabIndex = 10
- Top = 3360
- Width = 1200
- End
- Begin Frame Frame1
- Caption = "Do it now"
- Height = 1215
- Left = 3000
- TabIndex = 7
- Top = 3120
- Width = 1695
- Begin OptionButton Option2
- Caption = "No"
- Height = 255
- Left = 240
- TabIndex = 9
- Top = 720
- Width = 1000
- End
- Begin OptionButton Option1
- Caption = "Yes"
- Height = 255
- Left = 240
- TabIndex = 8
- Top = 360
- Width = 1000
- End
- End
- Begin TextBox TXT_Result
- Height = 375
- Left = 120
- TabIndex = 6
- Text = "Status output"
- Top = 4800
- Width = 4815
- End
- Begin TextBox TXT_KeyString
- Height = 375
- Left = 120
- TabIndex = 3
- Text = "This is a popup message to display in the window. The message can be of long length, or it can be short."
- Top = 1440
- Width = 4815
- End
- Begin CommandButton BTN_Exit
- Caption = "Exit"
- Height = 375
- Left = 3480
- TabIndex = 2
- Top = 240
- Width = 1455
- End
- Begin TextBox TXT_SearchString
- Height = 375
- Left = 120
- TabIndex = 1
- Text = "Dawg"
- Top = 2280
- Width = 4815
- End
- Begin CommandButton Btn_HelpSession
- Caption = "Help Balloons"
- Height = 375
- Left = 1800
- TabIndex = 0
- Top = 240
- Width = 1455
- End
- Begin Label Label3
- Alignment = 2 'Center
- Caption = "Search String"
- Height = 255
- Left = 120
- TabIndex = 5
- Top = 1920
- Width = 4815
- End
- Begin Label Label1
- Alignment = 2 'Center
- Caption = "Key String"
- Height = 255
- Left = 120
- TabIndex = 4
- Top = 1080
- Width = 4815
- End
- Begin Menu nmu_File
- Caption = "&File"
- Begin Menu mnu_Exit
- Caption = "&Exit"
- End
- End
- Begin Menu mnu_Edit
- Caption = "&Edit"
- Begin Menu mnu_Cut
- Caption = "Cu&t"
- End
- Begin Menu mnu_Copy
- Caption = "&Copy"
- End
- Begin Menu mnu_Paste
- Caption = "&Paste"
- End
- Begin Menu mnu_submenu
- Caption = "SubMenu"
- Begin Menu mnu_submenu1
- Caption = "SubMenu 1"
- End
- Begin Menu mnu_submenu2
- Caption = "SubMenu 2"
- End
- End
- End
- Begin Menu mnu_help
- Caption = "&Help"
- Begin Menu mnu_HelpBalloons
- Caption = "Help &Balloons"
- End
- End
- Option Explicit
- Sub Balloon1_BalloonClick (hwndAtMouse As Integer)
- ' PURPOSE: hwndAtMouse is the control the mouse is over
- ' COMMENTS: pass back the help text
- ' shows how to programmatcially end a session
- '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
- Dim Msg As String
- Dim CRLF As String
- CRLF = Chr$(13) + Chr$(10)
- Select Case hwndAtMouse
- Case Me.hWnd
- Exit Sub ' do nothing
- Case BTN_Dialog.hWnd
- ' set font and back colors dynamically
- Balloon1.ForeColor = QBColor(0)
- Balloon1.BackColor = QBColor(2)
- Balloon1.MessageText = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control BTN_Dialog."
- Case Btn_HelpSession.hWnd
- ' set font and back colors dynamically
- Balloon1.ForeColor = &HFF0000 ' blue
- Balloon1.BackColor = &HC0C0C0 ' light grey
- Balloon1.MessageText = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control Btn_HelpSession."
- Case BTN_Exit.hWnd
- ' set font and back colors dynamically
- Balloon1.ForeColor = QBColor(4)
- Balloon1.BackColor = QBColor(14)
- Balloon1.MessageText = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control BTN_Exit."
- Case TXT_KeyString.hWnd
- Balloon1.MessageText = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control TXT_KeyString."
- Case TXT_SearchString.hWnd
- Balloon1.MessageText = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control TXT_SearchString."
- Case TXT_Result.hWnd
- Balloon1.MessageText = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control TXT_Result."
- Case Picture1.hWnd
- Balloon1.MessageText = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control Picture1."
- Case Check1.hWnd
- Balloon1.MessageText = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control Check1."
- Case Check2.hWnd
- Balloon1.MessageText = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control Check2."
- Case Frame1.hWnd
- Balloon1.MessageText = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control Frame1."
- Case Option1.hWnd
- Balloon1.MessageText = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control Option1."
- Case Option2.hWnd
- Balloon1.MessageText = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control Option2."
- Case Option3.hWnd
- Balloon1.MessageText = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control Option3."
- Case Combo1.hWnd
- Balloon1.MessageText = "The hwndAtMouse = " + Hex$(hwndAtMouse) + CRLF + "The mouse is over the control Combo1."
- Case Else
-
- End Select
-
- End Sub
- Sub BTN_Dialog_Click ()
- Dialog.Show
- End Sub
- Sub BTN_Exit_Click ()
- mnu_Exit_Click
- End Sub
- Sub Btn_HelpSession_Click ()
- ' initial help text string
- ' here we get the text from the on screen text box
- '
- ' Initial text can be left blank, if blank then
- ' Balloon.vbx control will display an internal init message
- Balloon1.MessageText = TXT_KeyString.Text
- Balloon1.Action = 20 ' Balloon_START = 20
- End Sub
- Sub Form_Load ()
- Me.Top = 0
- Me.Left = 0
- End Sub
- Sub Form_Resize ()
- If Me.WindowState = 0 Then
- Me.Height = 6015
- Me.Width = 5175
- End If
- End Sub
- Sub mnu_Exit_Click ()
- End
- End Sub
- Sub mnu_HelpBalloons_Click ()
- ' initial help text string
- ' here we get the text from the on screen text box
- '
- ' Initial text can be left blank, if blank then
- ' Balloon.vbx control will display an internal init message
- Balloon1.MessageText = TXT_KeyString.Text
- Balloon1.Action = 20 ' Balloon_START = 20
- End Sub
-